/*
 * @Author: bear
 * @Date: 2022-08-01 09:56:18
 * @LastEditors: bear
 * @LastEditTime: 2022-08-05 16:04:39
 * @Description: your project
 * @version: 1.0
 */
import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";
import Home from "../views/Home.vue";
import b from "../views/B.vue";
import login from "../views/copy.vue";
import file from "../views/file.vue";
import menu from "../views/menu.vue";
import menu2 from "../views/menu2.vue";
import nodeModelEventEmitter from "../views/nodeModelEventEmitter.vue";
import stream from "../views/stream.vue";
const routes = [
  {
    path: "/",
    name: "stream",
    component: stream,
  },
  {
    path: "/nodeModelEventEmitter",
    name: "nodeModelEventEmitter",
    component: nodeModelEventEmitter,
  },
  {
    path: "/menu2",
    name: "menu2",
    component: menu2,
  },
  {
    path: "/menu",
    name: "menu",
    component: menu,
  },
  {
    path: "/file",
    name: "file",
    component: file,
  },
  {
    path: "/login",
    name: "login",
    component: login,
  },
  {
    path: "/home",
    name: "Home",
    component: Home,
  },
  {
    path: "/b",
    name: "b",
    component: b,
  },
];

const router = createRouter({
  history: process.env.IS_ELECTRON
    ? createWebHashHistory(process.env.BASE_URL)
    : createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
